Integrand size = 25, antiderivative size = 169 \[ \int \frac {\left (f+g x^2\right )^2 \log \left (c \left (d+e x^2\right )^p\right )}{x^4} \, dx=-\frac {2 e f^2 p}{3 d x}-2 g^2 p x-\frac {2 e^{3/2} f^2 p \arctan \left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{3 d^{3/2}}+\frac {4 \sqrt {e} f g p \arctan \left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {d}}+\frac {2 \sqrt {d} g^2 p \arctan \left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {e}}-\frac {f^2 \log \left (c \left (d+e x^2\right )^p\right )}{3 x^3}-\frac {2 f g \log \left (c \left (d+e x^2\right )^p\right )}{x}+g^2 x \log \left (c \left (d+e x^2\right )^p\right ) \]
[Out]
Time = 0.09 (sec) , antiderivative size = 169, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.240, Rules used = {2526, 2498, 327, 211, 2505, 331} \[ \int \frac {\left (f+g x^2\right )^2 \log \left (c \left (d+e x^2\right )^p\right )}{x^4} \, dx=-\frac {2 e^{3/2} f^2 p \arctan \left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{3 d^{3/2}}+\frac {4 \sqrt {e} f g p \arctan \left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {d}}+\frac {2 \sqrt {d} g^2 p \arctan \left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {e}}-\frac {f^2 \log \left (c \left (d+e x^2\right )^p\right )}{3 x^3}-\frac {2 f g \log \left (c \left (d+e x^2\right )^p\right )}{x}+g^2 x \log \left (c \left (d+e x^2\right )^p\right )-\frac {2 e f^2 p}{3 d x}-2 g^2 p x \]
[In]
[Out]
Rule 211
Rule 327
Rule 331
Rule 2498
Rule 2505
Rule 2526
Rubi steps \begin{align*} \text {integral}& = \int \left (g^2 \log \left (c \left (d+e x^2\right )^p\right )+\frac {f^2 \log \left (c \left (d+e x^2\right )^p\right )}{x^4}+\frac {2 f g \log \left (c \left (d+e x^2\right )^p\right )}{x^2}\right ) \, dx \\ & = f^2 \int \frac {\log \left (c \left (d+e x^2\right )^p\right )}{x^4} \, dx+(2 f g) \int \frac {\log \left (c \left (d+e x^2\right )^p\right )}{x^2} \, dx+g^2 \int \log \left (c \left (d+e x^2\right )^p\right ) \, dx \\ & = -\frac {f^2 \log \left (c \left (d+e x^2\right )^p\right )}{3 x^3}-\frac {2 f g \log \left (c \left (d+e x^2\right )^p\right )}{x}+g^2 x \log \left (c \left (d+e x^2\right )^p\right )+\frac {1}{3} \left (2 e f^2 p\right ) \int \frac {1}{x^2 \left (d+e x^2\right )} \, dx+(4 e f g p) \int \frac {1}{d+e x^2} \, dx-\left (2 e g^2 p\right ) \int \frac {x^2}{d+e x^2} \, dx \\ & = -\frac {2 e f^2 p}{3 d x}-2 g^2 p x+\frac {4 \sqrt {e} f g p \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {d}}-\frac {f^2 \log \left (c \left (d+e x^2\right )^p\right )}{3 x^3}-\frac {2 f g \log \left (c \left (d+e x^2\right )^p\right )}{x}+g^2 x \log \left (c \left (d+e x^2\right )^p\right )-\frac {\left (2 e^2 f^2 p\right ) \int \frac {1}{d+e x^2} \, dx}{3 d}+\left (2 d g^2 p\right ) \int \frac {1}{d+e x^2} \, dx \\ & = -\frac {2 e f^2 p}{3 d x}-2 g^2 p x-\frac {2 e^{3/2} f^2 p \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{3 d^{3/2}}+\frac {4 \sqrt {e} f g p \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {d}}+\frac {2 \sqrt {d} g^2 p \tan ^{-1}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {e}}-\frac {f^2 \log \left (c \left (d+e x^2\right )^p\right )}{3 x^3}-\frac {2 f g \log \left (c \left (d+e x^2\right )^p\right )}{x}+g^2 x \log \left (c \left (d+e x^2\right )^p\right ) \\ \end{align*}
Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.
Time = 0.09 (sec) , antiderivative size = 113, normalized size of antiderivative = 0.67 \[ \int \frac {\left (f+g x^2\right )^2 \log \left (c \left (d+e x^2\right )^p\right )}{x^4} \, dx=-2 g^2 p x+\frac {2 g (2 e f+d g) p \arctan \left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {d} \sqrt {e}}-\frac {2 e f^2 p \operatorname {Hypergeometric2F1}\left (-\frac {1}{2},1,\frac {1}{2},-\frac {e x^2}{d}\right )}{3 d x}-\frac {\left (f^2+6 f g x^2-3 g^2 x^4\right ) \log \left (c \left (d+e x^2\right )^p\right )}{3 x^3} \]
[In]
[Out]
Time = 2.15 (sec) , antiderivative size = 125, normalized size of antiderivative = 0.74
method | result | size |
parts | \(g^{2} x \ln \left (c \left (e \,x^{2}+d \right )^{p}\right )-\frac {f^{2} \ln \left (c \left (e \,x^{2}+d \right )^{p}\right )}{3 x^{3}}-\frac {2 f g \ln \left (c \left (e \,x^{2}+d \right )^{p}\right )}{x}-\frac {2 p e \left (\frac {3 x \,g^{2}}{e}+\frac {\left (-3 g^{2} d^{2}-6 d e f g +e^{2} f^{2}\right ) \arctan \left (\frac {x e}{\sqrt {d e}}\right )}{d e \sqrt {d e}}+\frac {f^{2}}{d x}\right )}{3}\) | \(125\) |
risch | \(-\frac {\left (-3 g^{2} x^{4}+6 f g \,x^{2}+f^{2}\right ) \ln \left (\left (e \,x^{2}+d \right )^{p}\right )}{3 x^{3}}+\frac {6 i \pi d f g \,x^{2} \operatorname {csgn}\left (i \left (e \,x^{2}+d \right )^{p}\right ) \operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right ) \operatorname {csgn}\left (i c \right )-3 i \pi d \,g^{2} x^{4} \operatorname {csgn}\left (i \left (e \,x^{2}+d \right )^{p}\right ) \operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right ) \operatorname {csgn}\left (i c \right )-3 i \pi d \,g^{2} x^{4} {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{3}-i \pi d \,f^{2} \operatorname {csgn}\left (i \left (e \,x^{2}+d \right )^{p}\right ) {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{2}+i \pi d \,f^{2} {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{3}-6 i \pi d f g \,x^{2} \operatorname {csgn}\left (i \left (e \,x^{2}+d \right )^{p}\right ) {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{2}+i \pi d \,f^{2} \operatorname {csgn}\left (i \left (e \,x^{2}+d \right )^{p}\right ) \operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right ) \operatorname {csgn}\left (i c \right )-6 i \pi d f g \,x^{2} {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{2} \operatorname {csgn}\left (i c \right )-i \pi d \,f^{2} {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{2} \operatorname {csgn}\left (i c \right )+3 i \pi d \,g^{2} x^{4} {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{2} \operatorname {csgn}\left (i c \right )+3 i \pi d \,g^{2} x^{4} \operatorname {csgn}\left (i \left (e \,x^{2}+d \right )^{p}\right ) {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{2}+6 i \pi d f g \,x^{2} {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{3}+6 \ln \left (c \right ) d \,g^{2} x^{4}-12 d \,g^{2} p \,x^{4}-12 \ln \left (c \right ) d f g \,x^{2}-4 e \,f^{2} p \,x^{2}+2 \left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (9 d^{4} g^{4} p^{2}+36 d^{3} e f \,g^{3} p^{2}+30 d^{2} e^{2} f^{2} g^{2} p^{2}-12 d \,e^{3} f^{3} g \,p^{2}+e^{4} f^{4} p^{2}+d^{3} e \,\textit {\_Z}^{2}\right )}{\sum }\textit {\_R} \ln \left (\left (18 d^{4} g^{4} p^{2}+72 d^{3} e f \,g^{3} p^{2}+60 d^{2} e^{2} f^{2} g^{2} p^{2}-24 d \,e^{3} f^{3} g \,p^{2}+2 e^{4} f^{4} p^{2}+3 \textit {\_R}^{2} d^{3} e \right ) x +\left (-3 d^{4} g^{2} p -6 d^{3} e f g p +d^{2} e^{2} f^{2} p \right ) \textit {\_R} \right )\right ) d \,x^{3}-2 \ln \left (c \right ) d \,f^{2}}{6 d \,x^{3}}\) | \(700\) |
[In]
[Out]
none
Time = 0.33 (sec) , antiderivative size = 350, normalized size of antiderivative = 2.07 \[ \int \frac {\left (f+g x^2\right )^2 \log \left (c \left (d+e x^2\right )^p\right )}{x^4} \, dx=\left [-\frac {6 \, d^{2} e g^{2} p x^{4} + 2 \, d e^{2} f^{2} p x^{2} - {\left (e^{2} f^{2} - 6 \, d e f g - 3 \, d^{2} g^{2}\right )} \sqrt {-d e} p x^{3} \log \left (\frac {e x^{2} - 2 \, \sqrt {-d e} x - d}{e x^{2} + d}\right ) - {\left (3 \, d^{2} e g^{2} p x^{4} - 6 \, d^{2} e f g p x^{2} - d^{2} e f^{2} p\right )} \log \left (e x^{2} + d\right ) - {\left (3 \, d^{2} e g^{2} x^{4} - 6 \, d^{2} e f g x^{2} - d^{2} e f^{2}\right )} \log \left (c\right )}{3 \, d^{2} e x^{3}}, -\frac {6 \, d^{2} e g^{2} p x^{4} + 2 \, d e^{2} f^{2} p x^{2} + 2 \, {\left (e^{2} f^{2} - 6 \, d e f g - 3 \, d^{2} g^{2}\right )} \sqrt {d e} p x^{3} \arctan \left (\frac {\sqrt {d e} x}{d}\right ) - {\left (3 \, d^{2} e g^{2} p x^{4} - 6 \, d^{2} e f g p x^{2} - d^{2} e f^{2} p\right )} \log \left (e x^{2} + d\right ) - {\left (3 \, d^{2} e g^{2} x^{4} - 6 \, d^{2} e f g x^{2} - d^{2} e f^{2}\right )} \log \left (c\right )}{3 \, d^{2} e x^{3}}\right ] \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 381 vs. \(2 (170) = 340\).
Time = 72.93 (sec) , antiderivative size = 381, normalized size of antiderivative = 2.25 \[ \int \frac {\left (f+g x^2\right )^2 \log \left (c \left (d+e x^2\right )^p\right )}{x^4} \, dx=\begin {cases} \left (- \frac {f^{2}}{3 x^{3}} - \frac {2 f g}{x} + g^{2} x\right ) \log {\left (0^{p} c \right )} & \text {for}\: d = 0 \wedge e = 0 \\- \frac {2 f^{2} p}{9 x^{3}} - \frac {f^{2} \log {\left (c \left (e x^{2}\right )^{p} \right )}}{3 x^{3}} - \frac {4 f g p}{x} - \frac {2 f g \log {\left (c \left (e x^{2}\right )^{p} \right )}}{x} - 2 g^{2} p x + g^{2} x \log {\left (c \left (e x^{2}\right )^{p} \right )} & \text {for}\: d = 0 \\\left (- \frac {f^{2}}{3 x^{3}} - \frac {2 f g}{x} + g^{2} x\right ) \log {\left (c d^{p} \right )} & \text {for}\: e = 0 \\\frac {2 d g^{2} p \log {\left (x - \sqrt {- \frac {d}{e}} \right )}}{e \sqrt {- \frac {d}{e}}} - \frac {d g^{2} \log {\left (c \left (d + e x^{2}\right )^{p} \right )}}{e \sqrt {- \frac {d}{e}}} - \frac {f^{2} \log {\left (c \left (d + e x^{2}\right )^{p} \right )}}{3 x^{3}} + \frac {4 f g p \log {\left (x - \sqrt {- \frac {d}{e}} \right )}}{\sqrt {- \frac {d}{e}}} - \frac {2 f g \log {\left (c \left (d + e x^{2}\right )^{p} \right )}}{\sqrt {- \frac {d}{e}}} - \frac {2 f g \log {\left (c \left (d + e x^{2}\right )^{p} \right )}}{x} - 2 g^{2} p x + g^{2} x \log {\left (c \left (d + e x^{2}\right )^{p} \right )} - \frac {2 e f^{2} p \log {\left (x - \sqrt {- \frac {d}{e}} \right )}}{3 d \sqrt {- \frac {d}{e}}} - \frac {2 e f^{2} p}{3 d x} + \frac {e f^{2} \log {\left (c \left (d + e x^{2}\right )^{p} \right )}}{3 d \sqrt {- \frac {d}{e}}} & \text {otherwise} \end {cases} \]
[In]
[Out]
Exception generated. \[ \int \frac {\left (f+g x^2\right )^2 \log \left (c \left (d+e x^2\right )^p\right )}{x^4} \, dx=\text {Exception raised: ValueError} \]
[In]
[Out]
none
Time = 0.32 (sec) , antiderivative size = 135, normalized size of antiderivative = 0.80 \[ \int \frac {\left (f+g x^2\right )^2 \log \left (c \left (d+e x^2\right )^p\right )}{x^4} \, dx=-{\left (2 \, g^{2} p - g^{2} \log \left (c\right )\right )} x + \frac {1}{3} \, {\left (3 \, g^{2} p x - \frac {6 \, f g p x^{2} + f^{2} p}{x^{3}}\right )} \log \left (e x^{2} + d\right ) - \frac {2 \, {\left (e^{2} f^{2} p - 6 \, d e f g p - 3 \, d^{2} g^{2} p\right )} \arctan \left (\frac {e x}{\sqrt {d e}}\right )}{3 \, \sqrt {d e} d} - \frac {2 \, e f^{2} p x^{2} + 6 \, d f g x^{2} \log \left (c\right ) + d f^{2} \log \left (c\right )}{3 \, d x^{3}} \]
[In]
[Out]
Time = 1.59 (sec) , antiderivative size = 108, normalized size of antiderivative = 0.64 \[ \int \frac {\left (f+g x^2\right )^2 \log \left (c \left (d+e x^2\right )^p\right )}{x^4} \, dx=\ln \left (c\,{\left (e\,x^2+d\right )}^p\right )\,\left (\frac {8\,g^2\,x}{3}-\frac {\frac {f^2}{3}+2\,f\,g\,x^2+\frac {5\,g^2\,x^4}{3}}{x^3}\right )-2\,g^2\,p\,x+\frac {2\,p\,\mathrm {atan}\left (\frac {\sqrt {e}\,x}{\sqrt {d}}\right )\,\left (3\,d^2\,g^2+6\,d\,e\,f\,g-e^2\,f^2\right )}{3\,d^{3/2}\,\sqrt {e}}-\frac {2\,e\,f^2\,p}{3\,d\,x} \]
[In]
[Out]